class Hasaki:
    def __init__(self):
        self.a=1

a=Hasaki()
setattr(a,'a',123)     # 设置a的值为123